<?PHP
error_reporting(E_ALL & ~E_NOTICE);

include "data/config.site.php";
require_once("include/link.php");
require_once("include/plugin.php");
define("INDEX_IN",1);
?>
<html>
<head>
<title><?php echo $site_name; ?></title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" type="text/css" href="css/layout.css" />
<script type="Text/JavaScript" src="include/jquery-1.7.1.min.js"></script>
</head>
<body>
<div id="main">
<div id="header">
<div id="logo">
<?PHP
/*
* Logo detective;
*/
$site_logo=$site_logo?$site_logo:"images/logo.default.png";
?>
<a href="<?PHP echo $site_url; ?>"><img src="<?PHP echo $site_logo; ?>" /></a>
</div><!-- end of logo -->
<div id="banner">
<?PHP echo $site_desc; ?>
</div><!-- end of banner -->
</div><!-- end of header -->
<div id="navigation">
<!-- <ul> -->
<ul>
	<li>
		>>
	</li>
<?php
$links=link_nav_get();
foreach($links as $link)
{
	echo "<li><a href='".link_rebuild($link[2])."' target='".$link[1]."'>".$link[0]."</a></li>\n";
}
?>
</ul>
</div><!-- end of navigation -->
<div id="vector">
<?PHP
if($_GET['path']!="admin")
{
?>
<div id="contents">
<?PHP
}
else
{
?>
<div id="admin_contents">
<?PHP
}
?>
<?PHP
/*
* Path parsing;
*/
$path=$_GET['path']?$_GET['path']:"home";
/*
* For security;
*/
include(link_resolve_path($path));
?>
</div><!-- end of contents -->
<?PHP
if($path!="admin")
{
?>
<div id="sidebar">
<?PHP
include(link_resolve_path("sidebar"));
?>
</div><!-- end of sidebar -->
<?PHP
}
?>
</div><!-- end of vector -->
<div id="footer">
Powered By <a href="http://www.rexlog.co.cc" target="_blank">Rexlog.HomePage</a> Version:1.4.9 2010 - 2012 Lei Peng, All Rights Reserved | <a href="?path=admin">CPanel</a>
</div><!-- end of footer -->
</div><!-- end of main -->
</body>
</html>
